$(document).ready(function() {
	
	module("Initialization");
	
	asyncTest("Load message", 2, function() {
		// let the interface load first
		var loadTimerCount = 0;
		var load = setInterval(function() {
			if ($("#contents-loading p").text() == "ready...") {
				clearInterval(load);
				start();
				ok(true, "Loaded within 5 seconds");
				ok(true, "The test continues");
			}
			loadTimerCount++;
			if (loadTimerCount > 10) {
				clearInterval(load);
				start();
				ok(false, "Loaded within 5 seconds");
				ok(false, "Aborting all tests");
				stop();
			}
		}, 500);
	});
	
	stop();
	
	test("Video players API loaded", 2, function() {
		start();
		equals(typeof player[0].getApi().getVolume, 'function', "Player 0 API loaded");
		equals(typeof player[1].getApi().getVolume, 'function', "Player 1 API loaded");
	});
	
	test("Search for video gViaOYgV8yI", 1, function() {
		start();
		ok(true, "continue");
	});
	
});